/*
 * @Author: yangzonglong
 * @Date: 2021-03-05 11:20:41
 * @version: v1.0.0
 * @Descripttion: formItem 控制器
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-08-17 15:27:08
 * @Auditor:
 */
import React from 'react';
import { memo, } from 'react';
import { Form, Checkbox } from 'antd';

const FormItem = Form.Item;

interface IProps {
  onChange(key: string, value: boolean): void;
  print?: boolean;
}

export default memo(
  ({ print, onChange }: IProps) => {
    return (
      <FormItem className="antd-form-item-row" label="打印">
        <Checkbox onChange={(e) => onChange('print', e.target.checked)} checked={print !== false} />
      </FormItem>
    );
  }
);
